<link rel="stylesheet" href="{{base_url()}}syslib/prettyPhoto/css/prettyPhoto.css" type="text/css" media="screen" title="prettyPhoto main stylesheet" charset="utf-8" />
<script src="{{base_url()}}syslib/prettyPhoto/js/jquery.prettyPhoto.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
    $(document).ready(function(){
        $("a[rel^='prettyPhoto']").prettyPhoto({
            animation_speed:'normal'
            //,theme:'dark_square'
            ,social_tools:false
            ,allow_resize: false
            ,default_width: 500
            ,default_height: 344
        });
    });
</script>
<div id="left_panel">
    <div class="title">+ Push Climbing Shop</div>
    <div id="category">
        <center>
            <ul>
                {{if isset($Data["Categorys"])}}
                    {{foreach $Data["Categorys"] as $v}}
                        <li class="{{if $Data["CategoryIndex"]==$v->_alias}}current{{/if}}"><a href="{{"shop/category/"|cat:$v->_alias|base_url}}">{{$v->_name}}</a></li>
                    {{/foreach}}
                {{/if}}
            </ul>
        </center>
    </div>
    <div id="product_wrap">
        {{if isset($Data["Products"])}}
        {{$foo=0}}
        {{foreach $Data["Products"] as $pr}}
            {{$foo=$foo+1}}
            <div class="product_panel" style="position: relative">
            <div class="product_title" style="
                 height: 26px;
                 position: relative;
                overflow: hidden;
                padding-right: 52px;">
                <a href="JavaScript:">+ {{$pr->ProductName|truncate:22:"..."}} - 
                    <span style="position: absolute;top: 0;right: 0" class="product_price">
                        {{if isset($_SESSION["Discounts"]) and ","|cat:$_SESSION["Discounts"]|cat:","|strpos:$pr->ProductID}}
                            ${{$pr->UnitPrice*90/100}}
                        {{else}}
                            ${{$pr->UnitPrice}}
                        {{/if}}
                    </span>
                </a>
            </div>
            <div class="product_img">
                <center>
                    <a 
                        href="{{$pr->Image}}" 
                        rel="prettyPhoto[product]"
                        title="{{$pr->ProductName}}"
                        >
                        <img alt="product" width="243" align="middle" src="{{$pr->Image|escape:'html'}}" />
                    </a>
                </center>
            </div>
            <div class="pr-{{$pr->ProductID}}" style="bottom: 18px;left: 16px;position: absolute;height: 16px">
                <span class="like" onclick="Vote('{{$pr->ProductID}}','like')">{{if isset($pr->Like)}}{{$pr->Like}}{{else}}0{{/if}}</span>
                <span class="dislike" onclick="Vote('{{$pr->ProductID}}','dislike')">{{if isset($pr->Dislike)}}{{$pr->Dislike}}{{else}}0{{/if}}</span>
            </div>
            {{if isset($_SESSION["Discounts"]) and ","|cat:$_SESSION["Discounts"]|cat:","|strpos:$pr->ProductID}}
            <div class="hot_ribbon"><img alt="hot product" src="{{base_url()}}PushClimb/images/discount_tag.png"></div>
            {{/if}}
            <div class="add_butt" onclick="addToCart('{{$pr->Alias}}')" style="padding-top: 12px;cursor: pointer"><img src="{{base_url()}}PushClimb/images/add_butt.gif" /></div>
        </div>
        {{if $foo>0 and $foo%2==0}}
        <div class="clear"></div>
        {{/if}}
        {{/foreach}}
        {{else}}
            No data to display.
        {{/if}}
        <div class="clear"></div>
    </div>
    <div class="next_back">
        <center>
            {{if $Data["PageIndex"]>0}}
            <span>
                <a href="{{base_url()}}shop/category/{{$Data["CategoryIndex"]}}/{{$Data["PageIndex"]-1}}">&larr; Back</a>
            </span>
            {{/if}}
            {{if isset($Data["Products"])}}
            {{if count($Data["Products"])==6}}
            <span>
                <a href="{{base_url()}}shop/category/{{$Data["CategoryIndex"]}}/{{$Data["PageIndex"]+1}}">Next &rarr;</a>
            </span>
            {{/if}}
            {{/if}}
        </center>
    </div>
</div>